Add GDK_TYPE_RECTANGLE.
authorOwen Taylor <otaylor@redhat.com>
Fri, 1 Jun 2001 15:44:13 +0000 (15:44 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 1 Jun 2001 15:44:13 +0000 (15:44 +0000)
Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkrectangle.c (gdk_rectangle_get_type): Add
GDK_TYPE_RECTANGLE.

* gtk/gtkwidget.c (gtk_widget_class_init): Fix type
of allocation argument be GDK_TYPE_RECTANGLE.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.h
gdk/gdkrectangle.c
gtk/gtkwidget.c

index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 10675e5e8858d275079ea14f2a80501db83102c2..83244f90b4f45de28b220e1bda7043f0a832c78e 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  1 11:31:55 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrectangle.c (gdk_rectangle_get_type): Add 
+       GDK_TYPE_RECTANGLE.
+
+       * gtk/gtkwidget.c (gtk_widget_class_init): Fix type
+       of allocation argument be GDK_TYPE_RECTANGLE.
+
 Thu May 31 12:43:57 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkoptionmenu.c: Account for the fact that the border
index 0fc565f93b484ec8045ee3ba365b6778454de28e..4d5bc2b84c800acbb852bd11fe9330a77fba3873 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -126,6 +126,8 @@ void     gdk_rectangle_union     (GdkRectangle *src1,
                                  GdkRectangle *src2,
                                  GdkRectangle *dest);
 
+#define GDK_TYPE_RECTANGLE (gdk_rectangle_get_type ())
+
 /* Conversion functions between wide char and multibyte strings. 
  */
 gchar     *gdk_wcstombs          (const GdkWChar   *src);
index 499112d2dcda8b279e9e27bb5010100c449e41bd..27e181c535ff5a263be147098bcd4453e2959feb 100644 (file)
@@ -81,3 +81,27 @@ gdk_rectangle_intersect (GdkRectangle *src1,
 
   return return_val;
 }
+
+static GdkRectangle *
+gdk_rectangle_copy (const GdkRectangle *rectangle)
+{
+  GdkRectangle *result = g_new (GdkRectangle, 1);
+  *result = *rectangle;
+
+  return result;
+}
+
+GType
+gdk_rectangle_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("GdkRectangle",
+                                            NULL,
+                                            (GBoxedCopyFunc)gdk_rectangle_copy,
+                                            (GBoxedFreeFunc)g_free,
+                                            FALSE);
+  return our_type;
+}
+
index 03d6f8ea3189689e55c0379b6287cc23f89535d8..f2ea169225cc784e00de55f2dbf012f351333d3d 100644 (file)
@@ -586,9 +586,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                    GTK_RUN_FIRST,
                    GTK_CLASS_TYPE (object_class),
                    GTK_SIGNAL_OFFSET (GtkWidgetClass, size_allocate),
-                   gtk_marshal_VOID__POINTER,
+                   gtk_marshal_VOID__BOXED,
                    GTK_TYPE_NONE, 1,
-                   GTK_TYPE_POINTER);
+                   GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
   widget_signals[STATE_CHANGED] =
     gtk_signal_new ("state_changed",
                    GTK_RUN_FIRST,